package com.wqm.batis.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wqm.batis.common.PageVo;
import com.wqm.batis.domain.HelloPay;
import com.wqm.batis.mapper.HelloPayMapper;
import com.wqm.batis.service.HelloPayService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * example表的注释 服务实现类
 *
 * @author: 王钦民
 * @date : 2023-12-18
 * @description: 一起变好吧
 */
@Slf4j
@Service
public class HelloPayServiceImpl extends ServiceImpl<HelloPayMapper, HelloPay> implements HelloPayService {

    @Resource
    private HelloPayMapper helloPayMapper;

    /**
     * 查询-分页查询
     *
     * @param page
     * @param pageSize
     * @return
     */
    @Override
    public PageVo<HelloPay> getPageList(Integer page, Integer pageSize) {
        PageHelper.startPage(page, pageSize);
        List<HelloPay> list = helloPayMapper.selectList(null);
        PageInfo<HelloPay> pageInfo = new PageInfo<>(list);
        return PageVo.convertPageInfo(pageInfo);
    }
}
